package boyan.model;

import java.util.Comparator;


public class BookInfoCompareto implements Comparator<BookInfo>{

	public int compare(BookInfo o1, BookInfo o2) {
		Double l1 = Double.valueOf(o1.getRating());
		Double l2 = Double.valueOf(o2.getRating());
		if(l1>l2) {
			return -1;
		}else {
			return 1;
		}
	}

}
